public class TestLoop {
    public static void main(String[] args){
        for (int j=1;j<=5;j++) {
            for (int i = 0; i < 5; i++) {
                System.out.print(j + "\t");
            }
            System.out.println();
        }



        //九九乘法表
        for (int j=1;j<=9;j++){
            for (int n=1;n<=j;n++){
                if (n*j<10){
                    System.out.print(n + "*"+j+"=" + " "+ (n*j) +" \t");
                }else{
                    System.out.print(n + "*"+j+"=" + (n*j) + "\t");
                }

                System.out.print(n + "*"+j+"=" + (n*j<10?(" "+n*j):n*j) +" \t");
            }

        }

        for (int i=1;i<=5;i++) {
            for (int j = 1; j<= 5; j++){
                if (i%2==j%2) {
                    System.out.print("*"+"\t");
                }else {
                    System.out.print("#" + "\t");
                }
            }
            System.out.println();
        }

    }
}
